package com.shuiyun.jtt.utils;

import com.shuiyun.jtt.message.jt808.T8604;
import com.shuiyun.jtt.message.jt808.T8606;
import com.shuiyun.jtt.message.jt808.extend.CircularArea;
import com.shuiyun.jtt.message.jt808.extend.RectangleArea;
import com.shuiyun.jtt.message.jt808.extend.T8401PhoneBook;
import io.swagger.models.auth.In;
import lombok.Getter;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 设备缓存
 *
 * @author shuiyun
 */
public enum DeviceCache {


    // 单例
    instance;

    /**
     * 设备联系人缓存 key-联系人 value-联系电话
     */
    @Getter
    private final Map<String, T8401PhoneBook> contactsMap = new ConcurrentHashMap<>();

    /**
     * 设备圆形区域 key-区域id value-圆形区域信息
     */
    @Getter
    private final Map<Integer, CircularArea> circularAreaMap = new ConcurrentHashMap<>();

    /**
     * 设备矩形区域 key-区域id value-矩形区域信息
     */
    @Getter
    private final Map<Integer, RectangleArea> rectangleAreaMap = new ConcurrentHashMap<>();

    /**
     * 设备多边形区域 key-区域id value-多边形区域信息
     */
    @Getter
    private final Map<Integer, T8604> polygonAreaMap = new ConcurrentHashMap<>();

    /**
     * 设备路线区域 key-区域id value-路线区域信息
     */
    @Getter
    private final Map<Integer, T8606> routeAreaMap = new ConcurrentHashMap<>();

    /**
     * 设备参数
     */
    @Getter
    private final Map<Integer, Object> terminalParamMap = new ConcurrentHashMap<>();

    /**
     * 行驶记录仪参数
     */
    @Getter
    private final Map<Integer, Object> tachographParamMap = new ConcurrentHashMap<>();

}
